<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="bootstrap.css">
    <style>
        .list-group-item{
            margin-bottom: 5px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="panel panel-info">
        <div class="panel-heading">
            <h3>花里胡哨 <input type="button" value="点击增加" class="btn btn-primary"></h3>
        </div>
        <div class="panel-body">
            <ul class="list-group">
                <li class="list-group-item" >花里胡哨1 <span class="close">&times;</span></li>
            </ul>
        </div>
        <div class="panel-footer">
            <p>&copy;花里胡哨</p>
        </div>
    </div>
</div>
<script src="jquery.js"></script>
<script>
    var num = 1;
    $(".btn").on('click', function () {
        num++;
        var li = $("<li class='list-group-item' >花里胡哨"+ num +" <span class='close'>&times;</span></li>");
        li.appendTo('.list-group');
    });
    $(".list-group").on('click','.close', function () {
        var parent = $(this).parent();
        parent.remove();
    })
</script>
</body>
</html>